package com.siwei.mes.mapper.experiment;

import com.siwei.mes.common.base.BaseMapper;
import com.siwei.mes.entity.experiment.ExperimentCheckTypeRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 原材料实验台账检查类型记录表(ExperimentCheckTypeRecord)表数据库访问层
 *
 * @author makejava
 * @since 2024-08-02 22:35:37
 */
public interface ExperimentCheckTypeRecordMapper extends BaseMapper<ExperimentCheckTypeRecord> {
    /**
     * 获取所有
     *
     * @param entity
     * @return
     */
    List<ExperimentCheckTypeRecord> getList(ExperimentCheckTypeRecord entity);

    /**
     * 根据id获取
     *
     * @param id
     * @return
     */
    ExperimentCheckTypeRecord loadById(@Param("id") Long id);

    /**
     * 根据检测类型获取最新一条数据
     *
     * @param entity
     * @return
     */
    ExperimentCheckTypeRecord getByCheckType(ExperimentCheckTypeRecord entity);

    /**
     * 根据类型删除
     *
     * @param checkType
     */
    void deleteByCheckType(@Param("checkType") Integer checkType, @Param("experimentType") Integer experimentType);
}
